using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class SnsCommentRequest : GeneratedMessageLite<SnsCommentRequest, SnsCommentRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<SnsCommentRequest, SnsCommentRequest.Builder>
		{
			private bool resultIsReadOnly;
			private SnsCommentRequest result;
			protected override SnsCommentRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override SnsCommentRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override SnsCommentRequest DefaultInstanceForType
			{
				get
				{
					return SnsCommentRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public SnsActionGroup Action
			{
				get
				{
					return this.result.Action;
				}
				set
				{
					this.SetAction(value);
				}
			}
			public string ClientId
			{
				get
				{
					return this.result.ClientId;
				}
				set
				{
					this.SetClientId(value);
				}
			}
			public Builder()
			{
				this.result = SnsCommentRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(SnsCommentRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private SnsCommentRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					SnsCommentRequest other = this.result;
					this.result = new SnsCommentRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override SnsCommentRequest.Builder Clear()
			{
				this.result = SnsCommentRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override SnsCommentRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new SnsCommentRequest.Builder(this.result);
				}
				return new SnsCommentRequest.Builder().MergeFrom(this.result);
			}
			public override SnsCommentRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override SnsCommentRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is SnsCommentRequest)
				{
					return this.MergeFrom((SnsCommentRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override SnsCommentRequest.Builder MergeFrom(SnsCommentRequest other)
			{
				return this;
			}
			public override SnsCommentRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override SnsCommentRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(SnsCommentRequest._snsCommentRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = SnsCommentRequest._snsCommentRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 18u)
						{
							SnsActionGroup.Builder builder2 = SnsActionGroup.CreateBuilder();
							if (this.result.hasAction)
							{
								builder2.MergeFrom(this.Action);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.Action = builder2.BuildPartial();
							continue;
						}
						if (num3 == 26u)
						{
							this.result.hasClientId = input.ReadString(ref this.result.clientId_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public SnsCommentRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public SnsCommentRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public SnsCommentRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public SnsCommentRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public SnsCommentRequest.Builder SetAction(SnsActionGroup value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasAction = true;
				this.result.action_ = value;
				return this;
			}
			public SnsCommentRequest.Builder SetAction(SnsActionGroup.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasAction = true;
				this.result.action_ = builderForValue.Build();
				return this;
			}
			public SnsCommentRequest.Builder MergeAction(SnsActionGroup value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasAction && this.result.action_ != SnsActionGroup.DefaultInstance)
				{
					this.result.action_ = SnsActionGroup.CreateBuilder(this.result.action_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.action_ = value;
				}
				this.result.hasAction = true;
				return this;
			}
			public SnsCommentRequest.Builder ClearAction()
			{
				this.PrepareBuilder();
				this.result.hasAction = false;
				this.result.action_ = null;
				return this;
			}
			public SnsCommentRequest.Builder SetClientId(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasClientId = true;
				this.result.clientId_ = value;
				return this;
			}
			public SnsCommentRequest.Builder ClearClientId()
			{
				this.PrepareBuilder();
				this.result.hasClientId = false;
				this.result.clientId_ = "";
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int ActionFieldNumber = 2;
		public const int ClientIdFieldNumber = 3;
		private static readonly SnsCommentRequest defaultInstance;
		private static readonly string[] _snsCommentRequestFieldNames;
		private static readonly uint[] _snsCommentRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasAction;
		private SnsActionGroup action_;
		private bool hasClientId;
		private string clientId_ = "";
		private int memoizedSerializedSize = -1;
		public static SnsCommentRequest DefaultInstance
		{
			get
			{
				return SnsCommentRequest.defaultInstance;
			}
		}
		public override SnsCommentRequest DefaultInstanceForType
		{
			get
			{
				return SnsCommentRequest.DefaultInstance;
			}
		}
		protected override SnsCommentRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public SnsActionGroup Action
		{
			get
			{
				return this.action_ ?? SnsActionGroup.DefaultInstance;
			}
		}
		public string ClientId
		{
			get
			{
				return this.clientId_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasAction && this.BaseRequest.IsInitialized && this.Action.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasAction)
				{
					num += CodedOutputStream.ComputeMessageSize(2, this.Action);
				}
				if (this.hasClientId)
				{
					num += CodedOutputStream.ComputeStringSize(3, this.ClientId);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private SnsCommentRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] snsCommentRequestFieldNames = SnsCommentRequest._snsCommentRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, snsCommentRequestFieldNames[1], this.BaseRequest);
			}
			if (this.hasAction)
			{
				output.WriteMessage(2, snsCommentRequestFieldNames[0], this.Action);
			}
			if (this.hasClientId)
			{
				output.WriteString(3, snsCommentRequestFieldNames[2], this.ClientId);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasAction)
			{
				num ^= this.action_.GetHashCode();
			}
			if (this.hasClientId)
			{
				num ^= this.clientId_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			SnsCommentRequest snsCommentRequest = value as SnsCommentRequest;
			return snsCommentRequest != null && (this.hasBaseRequest == snsCommentRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(snsCommentRequest.baseRequest_))) && (this.hasAction == snsCommentRequest.hasAction && (!this.hasAction || this.action_.Equals(snsCommentRequest.action_))) && (this.hasClientId == snsCommentRequest.hasClientId && (!this.hasClientId || this.clientId_.Equals(snsCommentRequest.clientId_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<SnsCommentRequest, SnsCommentRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<SnsCommentRequest, SnsCommentRequest.Builder>.PrintField("Action", this.hasAction, this.action_, writer);
			GeneratedMessageLite<SnsCommentRequest, SnsCommentRequest.Builder>.PrintField("ClientId", this.hasClientId, this.clientId_, writer);
		}
		public static SnsCommentRequest ParseFrom(byte[] data)
		{
			return SnsCommentRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private SnsCommentRequest MakeReadOnly()
		{
			return this;
		}
		public static SnsCommentRequest.Builder CreateBuilder()
		{
			return new SnsCommentRequest.Builder();
		}
		public override SnsCommentRequest.Builder ToBuilder()
		{
			return SnsCommentRequest.CreateBuilder(this);
		}
		public override SnsCommentRequest.Builder CreateBuilderForType()
		{
			return new SnsCommentRequest.Builder();
		}
		public static SnsCommentRequest.Builder CreateBuilder(SnsCommentRequest prototype)
		{
			return new SnsCommentRequest.Builder(prototype);
		}
		static SnsCommentRequest()
		{
			SnsCommentRequest.defaultInstance = new SnsCommentRequest().MakeReadOnly();
			SnsCommentRequest._snsCommentRequestFieldNames = new string[]
			{
				"Action",
				"BaseRequest",
				"ClientId"
			};
			SnsCommentRequest._snsCommentRequestFieldTags = new uint[]
			{
				18u,
				10u,
				26u
			};
			object.ReferenceEquals(micromsg.Proto.SnsCommentRequest.Descriptor, null);
		}
	}
}
